import react,{Component} from "react";
import Useritem from "../Useritem";

export default class Userlist extends Component {
    render() {
        const {userlist,now_chat_object_id}=this.props;
        // console.log("IN USRLIST, userlist: ",userlist)
        const {gotoChat}=this.props;
        return(
            <ul>
                {
                    userlist.map(user=>{
                        return <Useritem key={user.id} user={user} now_chat_object_id={now_chat_object_id} gotoChat={gotoChat} />
                    })
                }
            </ul>
        )
    }
}